﻿using IOP.Pulsar.Extensions;
using Microsoft.Extensions.Hosting;
using System.Threading.Tasks;
using IOP.Pulsar.Abstractions;

namespace PulsarIntegrationTest
{
    class Program
    {
        static async Task Main(string[] args)
        {
            await CreateHostBuilder(args).Build().RunAsync();
        }

        public static IHostBuilder CreateHostBuilder(string[] args)
            => Host.CreateDefaultBuilder(args)
            .ConfigurePulsarHost(builder =>
            {
                builder.AddTCPServer<StringContext>(option =>
                {
                    option.ServerName = "testServer";
                    option.Address = "";
                    option.Port = 6666;
                });
                builder.UseStartup<Startup>();
            }).UseEnvironment("Development");
    }
}
